<?php


namespace app\admin;


use app\BaseController;
use app\common\model\User;
use app\middleware\Before;

class ApiBaseController extends BaseController
{
    protected $middleware = [Before::class,];//验证token和访问控制器权利
    public function initialize()
    {
        // 这里随机搞一个用户 省的用户验证
        $user_info = (new User())->order('id asc')->find()->toArray();
        session('admin_user',$user_info);
        parent::initialize(); // TODO: Change the autogenerated stub
    }
}